<?php
	//----------------------- INPUT ELEMENTS -------------------//
	$ssFilter 		= $this->arrParam['ssFilter'];
	$selectLanguages = $ssFilter['lang_code'] . $this->formHidden('lang_code',$ssFilter['lang_code']);
	
	$selectClb		= $this->formSelect('id_clb',$this->Item['id_clb'],array('size'=>0,'style'=>'min-width:200px;'),$this->slbClub);
	$sotiendong 	= $this->formText ( 'sotiendong', $this->Item['sotiendong'], array ('class' => 'auto_numberic txtlong active', 'onchange'=>"get_alias()") );
	$tenkhachhang	= $this->formText ( 'name_khachhang', $this->Item['name_khachhang'].'  _ ID :'.$this->Item['id_kh_clb'], array ('class' => 'txtlong active','readonly' => '', 'onchange'=>"get_alias()") );
	//$id_kh_clb	 	= $this->formText ( 'id_kh_clb', $this->Item['id_kh_clb'], array ('class' => 'txtlong active', 'onchange'=>"get_alias()") );
	$id_kh_clb 		= $this->formHidden('id_kh_clb',$this->Item['id_kh_clb'], array ('class' => 'txtlong active', 'onchange'=>"get_alias()"));
	$ngaydong	 	= $this->formText ( 'ngaydong', $this->Item['ngaydong'],  array ('class' => 'hasDatePicker active','style'=>'min-width:200px;', 'onchange'=>"get_alias()") );
	$ngayhethan	 	= $this->formText ( 'ngayhethan', $this->Item['ngayhethan'], array ('class' => 'hasDatePicker active','style'=>'min-width:200px;', 'onchange'=>"get_alias()") );
	$selectUser		= $this->formSelect('id_user',$this->Item['id_user'],array('size'=>0,'style'=>'min-width:200px;'),$this->slbUser);
	
	
	
	
	$content 		= $this->cmsEditor('content',htmlspecialchars_decode($this->Item['content']),array('toolbar'=>'MyToolbar', 'language'=>'vi'));
	
	$arrInput = array(
				//array('label' => 'Chọn ngôn ngữ','input' => $selectLanguages),
				array('label' => 'Thuộc CLB','input' => '<div id="id_clb">' . $selectClb . '</div>'),
				array('label' => 'Số tiền','input' => $sotiendong, 'desc' => '<span class="red">*</span>'),
				array('input' => $id_kh_clb),
				array('label' => 'Khách hàng','input' => $tenkhachhang),
				array('label' => 'Người thu tiền','input' => '<div id="id_user">' . $selectUser . '</div>'),
				array('label' => 'Ngày đóng','input' => $ngaydong),
				array('label' => 'Ngày hết hạn','input' => $ngayhethan),
				array('label' => 'Mô tả','input' => $content, 'cols' => 2,'style' => 'padding-top:0;'),
			);
	
	

	//--------------------- Meta Options ---------------------
	$alias 				= $this->formText ( 'alias', $this->Item['alias'], array ('class' => 'textlong' ) );
	$tags		 		= $this->formTextarea('tags',$this->Item['tags'],array('rows'=>2,'class' => 'txtalong'));
	$meta_title 		= $this->formTextarea('meta_title',$this->Item['meta_title'],array('rows'=>2,'class' => 'txtalong'));
	$meta_description 	= $this->formTextarea('meta_description',$this->Item['meta_description'],array('rows'=>3,'class' => 'txtalong'));
	$meta_keywords 		= $this->formTextarea('meta_keywords',$this->Item['meta_keywords'],array('rows'=>3,'class' => 'txtalong'));
	
	$arrMeta = array(
			array('label' => 'Liên kết tĩnh','input' => $alias),
			array('label' => 'Tags','input' => $tags,'desc'=>'Mỗi Tags phân biệt nhau với dấu phẩy'),
			array('label' => 'Meta Title','input' => $meta_title),
			array('label' => 'Meta Description','input' => $meta_description),
			array('label' => 'Meta Keywords','input' => $meta_keywords),
		);
	
	//-------------------- SESSAGES ERROR ------------------
	if(count($this->messageError)>0){
		$errors = $this->formErrors($this->messageError,array('id'=>'errors'));
	}
?>


<div class="left_content">
	<?php echo $this->render($this->arrParam['controller'] . '/toolbar/left.php');?>
</div>


<div class="right_content" style="background: #fff !important;">
	<div class="block_breadcrumb">
		<?php echo $this->blkBreadcrumbs('default'); ?>
	</div>
	<div class="appContent">
		
		<?php echo $this->render('admin-sinhhoatclb/toolbar/index.php');?>
	 	<div class="clr"></div>
		<?php echo $this->render('admin-sinhhoatclb/sublink/index.php');?>
		<?php echo $errors;?>
	

	<form name="appForm" method="post" action="" enctype="multipart/form-data">
	 
	<div class="tblForm">
	
		<!-- BEGIN: CONTENT -->
		<div class="app_content goc10">
			<div class="width-60 fl">
				<fieldset class="adminform">
					<legend>Chi tiết</legend>
					<table class="adminformlist">
						<?php echo $this->partialLoop('row.php', $arrInput);?>
					</table>
				</fieldset>
			</div>
			
			<div class="clr"></div>
		</div>
		<!-- END: 	CONTENT -->
		</div> 
	</form>
	</div></div>